<?php
/*
 *  MySQL Database Functions
 */

define(DB_USER, '');
define(DB_PASSWORD, '');
define(DB_URI, '');
define(DB_NAME, '');

/*
 * Connects to the database
 * @returns database handler
 */
function open_db() {
	$connection = mysql_connect(DB_URI, DB_USER, DB_PASSWORD);
	mysql_select_db(DB_NAME);
	if (!$connection) {
		printf("Connect failed: %s\n", mysql_error());
		exit();
	} 
	
	return $connection;
}

function close_db($conn) {
	mysql_close($conn);
}

?>